home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / Backup.mrbk < prev    next >
Text File  |  1996-09-26  |  1KB  |  63 lines

  1. /*   backup.mrbk            */
  2. /* This simple program runs MRBackup, performs a backup, then terminates. */
  3.  
  4. signal on ERROR
  5. signal on BREAK_C
  6.  
  7. options results
  8.  
  9. if ~(Show('P', 'MRBackup_#1')) then do
  10.     say "You must run MRBackup first. With a little work, you could"
  11.     say "get this ARexx script to do it for you."
  12.     exit 1
  13. end
  14.  
  15. address "MRBackup_#1"
  16. poptofront
  17.  
  18. backpath = "DF0:"
  19. setbackpath backpath
  20. if rc ~= 0 then do
  21.     say "Failed to set backup path to " || backpath
  22.     quit
  23.     exit 1
  24. end
  25.  
  26. homepath = "DH0:"
  27. sethomepath homepath
  28. if rc ~= 0 then do
  29.     say "Failed to set home path to " || homepath
  30.     quit
  31.     exit 1
  32. end
  33.  
  34. backup
  35.  
  36. if rc ~= 0 then do
  37.     say "Backup failed; error code: " || rc
  38.     quit
  39.     exit 1
  40. end
  41.  
  42. quit
  43.  
  44. exit 0
  45.  
  46.  
  47. /*------------------------------------------------------------------*/
  48.  
  49. break_c:
  50.  
  51. say "*** Control-C recieved.  Stopped by user. ***"
  52. exit 5
  53.  
  54. /*------------------------------------------------------------------*/
  55.  
  56. error:
  57.  
  58. say "Error"
  59. exit 6
  60.  
  61. /*------------------------------------------------------------------*/
  62.  
  63.